package com.yoga.app.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import javax.annotation.Resource;

/**
 * Created by chenjin on 2019/6/26.
 */

@Configuration
public class AppConfigurer extends WebMvcConfigurerAdapter {

//    @Value("${signStatus}")
//    private Integer signStatus;

    @Resource(name="stringRedisTemplate")
    private ValueOperations<String,String> vops;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new SignInterceptor(vops)).addPathPatterns("/**");
    }


}
